package play.go.controller;

import org.slim3.controller.Navigation;

import play.go.GoServer;
import play.go.model.Game;
import play.go.model.Player;

public class PlayController extends AbstructGoController {

    @Override
    public Navigation run() throws Exception {
        Player player = getPlayer();
        Game game = getGame();
        int x = asInteger("x");
        int y = asInteger("y");
        System.out.println(player + "=> [" + x + ", " + y + "]");
        GoServer.play(game, player, x, y);
        return text("OK");
    }

}
